Weighted updates

Added possibility of weighting an update.