updated to add before filters