implement delete study function