Using observed doesn't seem to work, changing to a function