Dictionary code improved