test the right length and remove unused var (remaining from 'old' version)