fixed callback api errors added result functionality connects with databsse api