remove unboxing and using contains

remove unboxing and using contains