added space encode