made changes to APIManager.php