Updates to get_context function