* Added callback
* Made library more flexible