refactored the interceptor and moved all the render logic into a separate file