Code for pkDex example