adapt to mobile view and space separator input