modify for ArrayList arguments