Allow to specify callable using a factory