Got editing to work with database