implement map in standard encoder