initialize context in doInit method