move translation into separate class