implemented generation of a simple code