added some global variables to work with decimal function.