added function to get input excluding location