added option for deterministic weights etc