changed indentation and removed unused function