restored some deleted codes by me, from a previous commit.

Signed-off-by: Haydar <haydar.issa@carleton.ca>