mysql connection code modified