moved a few things to Utils
List.size == 0 is slow