added ruby class and fixed java class