replace missing code