added pdf mode