added new test case

space fix
minor bug fixes