fixed hasPrefix and handling of empty keywords
updated tests
renamed hasPrefix to startsWith