Amend logic and update copyright statement

Amend logic and update copyright statement.