solved first problem