Changed format functionton to only format if given a number