finished getUserInput and updated screenToIndex to handle out-of-index error