finished infrastructure, need to improve db.php