hmm, now I understand; still thinking there must be a nicer way