extracted common features, added first functional test