Added user defined units support