bug fixs and add delete put function