split mapDb to its own file