response after inserting and improve js