servlet filter to avoid concurrency issues