Basically the CaExp but written in Java