can't figure out how to index into database, but it should work