Add num dependency
Add missing functions; add test