refined settings, added callback feature and event handling