using maps for the codes done