Do this less stupidly