removing dependency on sys