removed redundancy and added some more explanations