Used a more suitable API function to get data