giving flexibility to num constructor