fixed delete function; used better submission mechanism