refactoring
begun nmi analysis