bug fixes, mostly working, print statements