replaced slicing with startswith