couple refactors