separate context from scanner