updated to avoid using .cfg files.