looking up variables properly