Updated --> working with SQL database