working out the end game...