add decimal code and clean up logging