Adding random code generator