change gaps moving by spaces. also fix moving bug