new pen code structure