renamed hasPrefix to startsWith