implement input