added possibility to pick number of planes