now needs code to work from old version