copied in ascii maps and functions from Bruce's example code