implemented almost all map operations