replace dperecated methods