added recursive functin. removed printUnhidden.