bugs fixed, tidied, print plots