update Adapter.php