fixed some formatting issues and replaced tabs with spaces