another code refactors