added recursive printing