little modified with MySQL class