moved the various corridor function into a class