adding an optional spaces param