refactored map test