Trying things from tutorials.jenkov.com and mkyong.com