make implementation and docs better