refactoring of    methods