refactoring: removed additional variables