fixed warning and deprecated function