added secondary constructor to context template