First submission

scored 7/10, review algorithm?