made some variables final to allow compilation on jdk 7