added min check