submit and variable saving added