framework for exercise05 in d