Added conditional for GET & POST