split up api class