add javadoc comments and test flash button