see tests for examples