implemented new feature by adding line 11