added a get6DOF function