adding console logs for debugging