rewrote due to missunderstanding + added the required docs