fix bug; add printing of metadata for testing