* added map directive
refactoring