TODO now: deal with not-connected inputs