add empty functions for onsuccess and onfailure