Removed microsoft crap, added weight function