* move initialization of context to the top