quarternary
final version