segfaults but so does house's example, need to check on lab computers