rm console.logs and incorrect typecast attempt