refactored nptyoes