Refactor balance function