global before and after seems to work