moved the generatesine back into generate