further implementation of triggers. Still troubles with XML format.