replace from "final static" to "static final". optimize loop and if.