#1641 making test check API call as well

- also renaming util function