Modified in order to run with MySQL