we should definitely add tests for this