add deplay to JS to be friendly to the backend