resolving variable issue