Make utility more generic