refactored reversed