change (id)init to (instancetype)init
fix notification bug

added observer before notifying