added context argument and context tests