solutions to the first assignment