fixed editing and database