added value and index methods, passing tests