Edited to working database