Rewriting code :'(