restructuring and added code to interface with vpr rr generation