added copyright notices and comments