almost working
fixed encoding