refactor to use proper conversion between size units