added assert to check api key