handle space and return