adding api code from jer