added extension code to model