random map pair
template fill improvements