error was a result of a wrong variable assignment, array location was used insted of response