adding better console.log messages in the success ifs