some refractoring in Interceptor.scala