updated for better support for different file presentation/logic