functional. adding observer