Using triggers to modify data on the fly