finished the main coding and added several comments describing the code, and also an example