Improved class and add deprecated method