Database now working