core part. tested.