Input and output mags work -few bugs