refactored code and changed behavior of additional arguments