Updated for use with new DB connection