feat: support define, add test
imporve coverage