Tried to find seg fault, not solved, added comments and couts