formatting and updating source code.
added missing fiels.