updated code for revel reorganization