minor improvments; this version can be compiled and linked