replaced tabs with spaces and fixed indenting