Input Handler refactored

need to handle random elements