added signature control, debugged pdf generation