uses context and arguments for fn