added dynamic rendering of codes