HW4:task1: memory leak fixed(I hope, all of it :( )