fix bug and delete console.log