tests would make this easier