Call of draw function has been corrected
moved initialisation of objects.array to function objects