some re-ordering seems to be rquired