Implemented the fsk_mod function