first real implemetations and tests