updated 2nd commit with correct solution