clear and rebuild