Changed arguments and variable types from ArrayList to List