add test for creation and fix bug