fixed printHTML method definition