setting max number of planes