Added all the functonality like the video tutorial