fixed non object error
added delete method