a machine with balls and trees