move instance var declarations closer to method definition