encoding works now