few refactors