added more cast typing