documentation and code commenting added
warnings solved