allow context to be passed in