replaced experimantal exception, moved cast into method