split form from main js, switched back to php
separate interface from logic