cut input handaling done