refactoring: reduced local and $get params to 4