handle local variables better