some slight refactors