Fix issues, write computeFields method