moved duplicated code to utils class, added update for notes