some usefull code in c