Translated some code