changed identation and fixed the code