encoding and rating