imroved memory error
add template models for translation