fixed deprecation waring and fixed doc