This is the implementation of my master.