Modified: set behavior of submit and button creation