solution one and tests