Implementation of the methodOne.

Signed-off-by: mohsen <kamrani@ce.sharif.edu>