adding the weight constraint switch (NOT TESTED)