combined functionality of api4 and api5