remove console.logs and add callbacks