refactored class to manage interaction between Map and Dawer to make it more reusable