implemented map for state