My utility package (C version)