it works, but still needs some work on javascript