add code for fixing space problem