fixed bugs, sine still doesn't work