submit data function