seg fault was fixed