reverted certain changes that don't change performance (maybe they even improve it slightly) to have this alternative in history
input and output are now independent