moved contex to own file