added delete and fix minor changes