code polishing on Deterministic class