[nim] Refactored