renamed noise function
simplified windows code