open and free implemented, but interface.c not working, so cannot be checked the correctness of the code