fixes #2 update the spaces method and tests