added code/pseudocode for checking algorithm
*NOTE* does not work so everything is commented out