rework based on api wiring