add test and main entry