refactored ridley initialization to avoid duplicate code