using cat as template. start work on sort