refactoring on various methods