added a before clause