I can't figure this problem out:

A bar that's initially held horizontally, weights 500g and is 2m. long. It's maintained by a pivot at its extremity. We then let it fall until it's vertical. We neglect air resistance. What will be the angular velocity at that moment? Hint: use the energy approach

Thank you

change in gpe: 1m*.5*9.8

KE final= 1/2 I w^2
I for bar on its end is 1/3 m l^2= 1/3 *.5*4=2/3

changegpe= KEfinal
4.9=1/2 2/3 w^2
solve for w.