replaced old styl mysql with  mysqli API