Added constraints to outputs and inputs