basic renamed to lib, add filesize func