cleaned up reading files