startsWith helper and tests