added the logic to only support 3 max entries