refactor code to resize vsplited window width