added var keyword for mutable locals