modified to have separate source and target vocabulary