add function: hasSize in Helper.java