Added functions for discrete input levels.