add order scope to branches model