Input getting part is working for somecases