Refined according to review comments