Added encoding and own implementation of 1$ recognizer