Could you write some tests for this?