Dev

rewrite using mysqli