Fixes #23

also refactored the observer a bit