Added modes for java