refactor astM