the basic implementation of the frietkot problem