Functional version that needs to be improved, specially in what concerns the noise generation.