refactored IO system, now can explicitly check arguments in SM