refactored method names, added comment