function 9 in number lib passing to main code, only for numbers need to fix for nan