fixed lots of issues with adding, deleting, and updating