fixed creation bug, updated tests