Update extract.java

Added more comments