Add possibility of passing priority for adding an observer