updated delete and modification method to use API