change to outer box layout and inner flow layout. update javadoc