added stub_api struct that is useful for testingf