Shoud have been better at writing tests. Fml