Got sin wave working properly