changed order of deletes - needed due to foreign key constraints to delete