added space and switched semantics