Solved first 2 problems