started implementing the function converting enum to map