change the way to find a proper constructor