Final Comments and testing

Added detailed comments for both the functions and
additional steps how  it was verified