added some copyright notices to some functions