Added getContexts() function