modified the function lifeLine