update test and add main