fixed byLevel function
added stream example