add minimal functionality and some tests