refactored anser