modified the way the getvms method was calling to the api