Add branches sorting