general refactors