template version of LSOBC