switch typer to use map - thanks for the advice Aaron