finished mysql integration