removed the encode and made the func data