fixed some bugs and finished subscriptions