major overhaul in key merging with yaml file