First Solution to problem