changed some imports and made fewer API calls