fixed bug in part 1