cleaning up outut and making more general
minor fixes