prototype api func