avoiding an API call if possible