Added comments to the final code

also added an if statement for only positive numerical values work.