Text this: Modeling of semiconductor optical amplifier gain characteristics for amplification and switching