Updated for java 17