added hw3
finished first write of hw3, segfaults