convert to map based dispatch
use type direct from gh