working successfully and segfaulting :-_-: