change the way to instantiate logic