Direct observation of the 4+-to-2+ gamma transition in 8Be