refactored map into spearate view