add test and implement for parser