fix global leakage + add test + edit readme