ironed out type errors