started implementing create_pe method and tests