Changed ArrayList to list and manged return type compatibility