fixed success and error msg and callback handeling