Added logic.
Added print statements.