clean up + add history function binding