added classes to decoder encoder