updated so pipeline orders stages by priority