this needs explanatory comments