worked a bit on master.c