revamped input class, now generic