more refactoring of various methods