allow passing parameters to getSpaces