updates agre and readme
adds count for links, much better error checking