Added vermeesh's min age calculation code