added some more code
removed unnecessary copyright, it has been moved