replace static method with dynamic