ATTEMPT to clear compiler errors. Rough start to function successor()