add a delegate protocol and change a few files name