add tests

This reverts commit bfeff534af670e3f4b7fb75032b9d18742ae6e19.