modified the mysql stuff