Final submission with some correction