Full Rewrite (does not currently work)