Var implementation
Refactored for clarity