refactored by coding standard; More steps added; Verification added;