updated moai java app implementation