eliminated repeat code according to DRY
added updatedb
added delete