reworking primal to use it for an assignment for school