write implemented but not working, most probably caused by the interface.c since Xavi told me that there was some errors at this file