updated code, implemented GET requests