calculate function; validate form; clean form;