implement schema and mapper.