added the printstring method