attempted fix for type error