add a little java, a few patterns