Database and threads are now woring