covered in unit tests
warning hunting