changed prepend to add in order