make argument more readable
Improved naming
Introducing hook system
added tests