implmented validation and animation api