delete warnings and handling more errors