all: unit test + functional implementation (from lecture)