more code to fix duplicated errors