fix noise function