change url encoding and add test