refactor observer heloper