added inputstate send and receive. final for demo