module updates, code reviewed and improved