rehashed the code refactored and now it should be revised by paul and start working on this module