more examples for learning + cleaned up slightly the codes