fixed enum error, map functions correctly