code cleaning for warnings