making gc handle dep cycles correctly, will probably need to add proper cycle collection later