Consolidating with working version