added unsubscribe methods, refined code