The picture of the graph is attached did I do this right?

Write the equation form of the piecewise function (all three) from left to right

Line 1 (left) I got -1/2x-4 for -4<x<-1

Line 2 (middle) 1x-1 for -1<x<2

Line 3 (right) y=2 for 2<x

Then we are to Find the domain and range I got

D: [-4,2] U [2,infinity) R: [-2,4]