fix and add test