reference variables properly