removed unwanted code and worked with indentation