implemented new method and refactoring  with active_support gem