first version, tests included