rebase updated to use LQUP decomposition