rebased to an older version, whitout any systemd requirements