refactors, improvements