qp added and everything works but there's a valgrind type of error