Seg fault problem fixed
final adjustments