Dynamics of an age structured epidemic model