added lib_generic.sh