add support for callback functions
clean code
clean code