sorted building