modified HelperFunctions and Number.cpp