refactored some code, added boiler plate code for regular language empty test