add unit tests for generalized LS