use modified MySQL cookbook