add require to suppress warning; remove variable

1. add require to expose `to_d` method and suppress warning
2. drop unnecessary variable assignment

Not so sure about 1. but wanted to propose the change