replace cast with UNUSED