re-implemented input