moved the response js out