implement 'trans' command for updating data structure