added response code

added response code on delete, fixed some part of the code