a lot of comments, new tripdomain function and function for reverse transformation