rewrote successor and predecessor in recursive scheme