Putting input in arraylist