NOW IT WORKS WITH DATABASE, WE NEED TO CORRECT THE DATA