after running analyze, removed unread values
refactored to modern syntax