checking length of correct var