cleaned up encoded