1st version
added tests