more work on function generater

need to finish generatewaveform