Use a boolean instead of int to determine which element to add to ArrayList