I have tried to write code by myself.