Added mathmatical function in the comments to streamline coding process.