added prev and next function
Merge pull request #2 from ShawTim/master

added prev and next function