fix using deprecated methods