optimized for mysqli better working