Added latticeWithFrequency