refactorings to get params