Solution for the first method of kata two