cleanup args processing for contained_in case
move util method to utils