fixed the order of response.js execution. Thanks @Anthony