improving submit behavior