simple logic problem. Trying out Java 8, so needed something simple.