refactor constructor with literal string, refactor getMagicNumber method with Number and String functions
refactor if statement for precision