Added validations to day3Expressions

tested all loops work correctly