added api orca. various bug fixes