trying to solve first problem