refactoring cap_me method