http://www.java-forums.org/new-java/56136-problem-loop.html