beginning of a new implementation, using Soenke's typed rest