more changes to sub-routine