support version 18
remove unused
fix deprecated warnings