Implement getOrigin.