fix dependency, improve validation