moved problem into primitives