fixed throws type error