move print_lines and delete_lines inside read lines
stopped segfault
remove malloc from append function
fixed delete_lines so it releases all memory