better support for keya and secret
new structure for examples