converted to use mysql