replaced gamma with ctx in the tests