added callback support fixed #4