use integer to index into metadata; fix scrolling