first version of miolib.c