Think I got it using examples from .mkyong.com