added all the r stuff to produce the 5 pics