implemented substitute