refactor

added support for diameter param, fixed accuracy