added expired checks