use vector so that we don't have to do a reverse at the end