raising error for no spaces