improve post policy scope to remove anonymous class