add test and comments