some truss algo refactoring