movies translation logic into two functions for translating response