Added comments, pre/post conditions