code day_3: refacting