redoing procedure to accept strings and number argument.
reference error fixed
fixed some bugs