added reversek and also append to end