added and fixed test case, refactored
added file