Applying weights