update directory to use method call instead of var assignment