type casing and @SuppressWarnings("unchecked")