move deprecated methods to the end of the file

retain object be performed with
add some code samples