Example and some auxiliary functions added

make distcheck works