refactoring not to use variadic arguments