tests coverage improved
refactored viewMap method and fixed bugs