code refactoring, added default values for first and second step