set formatting based on file type
merged updates with github copy