converted to use pupils