managed to communicate with API