Rewrite this damn thing