added changes according to specification