getting closer to generic codes