add order, js functions and validation