assigned null to struct member to avoid segfault
added print function
working on delete function