refactor mem when method returns false or nil