Added an explanation of the implementation