finished hw parts 1 and 2, and tested on localhost