Updated program according to specifications