Added cin control code
Working code has PV records implemented