added a print function, probably needs some work