resolve some of the ugliness with a typedef