validates and callbacks