refactor functions for single responsibility