Rewrite #2 - working