Changes 21/1 : removed while loop, removed unused functions