Almost working, gives results and segfaults xD