added normalize
added randomize