seperate translate to function