patching split function to return the correct key