update examples and remove old code