flexible input demean