this should partly fix issue #32 and issue #9
moved to interceptor package