added new test case, modified function to check ahead and behind two spaces