wrote psk and dpsk modulation functions