Revert "rewrite for simpler library without DSL"

This reverts commit 64a25aa01eb86c7b337faf38635f282f1dbe186a.