Unnecessary variable removed
validation not working