modified rfind to fix offset found in strrpos issue