updated for ZAPI integration