changed void to arraylist return type