move test file to examples
refactoring