added submit and auto reload on close