logging added, code commenting done