use logic from stdenv