added callback support (currently doesn't check for invalid characters in callback)