can we add tests for the logic here?