finished most of the implementation for the map controller (I think)