wrote a few more functions including esrchc