wrote getFwdVid and updateFwdVid functions, added some comments