correctly set up before filter