fixed spacing
added assert to make sure hyperparameters are positive