Solved first problem