finished basic version of homework 1