added testing examples
fix bug