added delete and bunches of other stuff