added mills to function