Updated the code - map is the only function left to write!