Should have been better at writing tests..