added translate function to several views