adding trigger to database