hopefully fix up types a bit