edited number() function