Made submit function