alternative atmost-encoding