added variables when calling functions