added the function for switching the context, with todos
forgot to add this file in previous commit